import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import Pagination from './components/Pagination/index.vue'
import RightToolBar from '@/components/RightToolbar/index.vue'
import {parseTime, resetForm, addDateRange, handleTree, download} from "@/utils/ruoyi";

import environment from './utils/environment'
import en from "element-ui/src/locale/lang/en";

import SlideVerify from "vue-monoplasty-slide-verify";
Vue.use(SlideVerify);

Vue.config.productionTip = false

Vue.use(ElementUI)

Vue.component('Pagination', Pagination)
Vue.component('RightToolbar', RightToolBar)
Vue.prototype.getBaseUrl = environment.getBaseUrl
Vue.prototype.getToken = environment.getToken
Vue.prototype.parseTime = parseTime
Vue.prototype.resetForm = resetForm
Vue.prototype.handleTree = handleTree
Vue.prototype.download = download

Vue.prototype.msgSuccess = function (msg) {
    this.$message({ showClose: true, message: msg, type: "success" });
}

Vue.prototype.msgError = function (msg) {
    this.$message({ showClose: true, message: msg, type: "error" });
}

Vue.prototype.msgInfo = function (msg) {
    this.$message.info(msg);
}

new Vue({
    el: '#app',
    router,
    store,
    render: h => h(App)
}).$mount('#app')
